HTMLModelElement: currentTime property

The HTMLModelElement interface's currentTime property specifies the current model's playback time in seconds.

Changing the value of currentTime seeks the model's animation to the new time.

Value

A double-precision floating-point value indicating the current playback time in seconds.

If the model is not yet playing, the value of currentTime indicates the time position within the media at which playback will begin once the play() method is called.

Setting currentTime to a new value seeks the model animation to the given time, if the animation is available. The time is clamped to the duration of the model animation, given as duration.

For models without an animation, the duration is set to 0, and any attempt to set currentTime will revert to 0.

Note: A model's currentTime and duration are unaffected by changes to its animation's playbackRate.

Examples

js
const model = document.createElement("model");
console.log(model.currentTime);

Specifications

No specification found

No specification data found for api.HTMLModelElement.currentTime.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

See also